AppStoreの署名検証・CSRF・CORS・アップロード検査を強化#8
Merged
Merged
Conversation
tas0dev
requested changes
Jun 12, 2026
tas0dev
left a comment
Contributor
There was a problem hiding this comment.
気になる箇所があるので修正してください。また、apiを追加したのならばOpenAPIに書き加えるべきです。
tas0dev
approved these changes
Jun 13, 2026
tas0dev
left a comment
Contributor
There was a problem hiding this comment.
ありがとう、非常に良いと思います。
感謝します。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
mochiOS AppStore / Developer Console / API の主要なWebセキュリティリスクを修正しました。
主な変更は以下です。
msign verifyに登録済み公開鍵を渡す検証経路を追加脅威モデル
このPRでは、以下の攻撃を主に防ぎます。
public_keyを攻撃者の鍵に差し替え、key_idだけ登録済みに見せる署名検証バイパス実装メモ
msignはAPPSTORE_MSIGN_PATHまたはconfigのmsign_pathで指定できます。package_hashは後方互換のため残し、現状はcontent_hash相当としてdocsに明記しています。audit_logsテーブルを追加しました。CREATE TABLE IF NOT EXISTS/CREATE INDEX IF NOT EXISTSを使っており、同じDBに2回流してもエラーにならないことを確認済みです。テスト
追加・更新した主なテスト:
Sec-Fetch-Site: cross-site拒否msignによる--pubkeybind確認実行した確認:
結果:
migration再実行確認:
結果:
残る制約
msignと実署名済み.pkgを使ったE2E fixtureは未追加です。frame-ancestors/object-src/base-uri中心の段階導入です。